<template>
	<uv-navbar :title="title" :border="border" :bgColor="bgColor" :height="height" :placeholder="placeholder" :fixed="fixed" @leftClick="leftClick" :titleStyle="titleStyle" :leftIconColor="leftIconColor">
		<template #left>
			<slot name="left"></slot>
		</template>
		<template #title>
			<slot name="title"></slot>
		</template>
		<template #right>
			<slot name="right"></slot>
		</template>
	</uv-navbar>
</template>

<script setup>
	import { defineProps } from'vue'
	
	const props = defineProps({
		title: {
			type: String,
			default: ''
		},
		border: {
			type: Boolean,
			default: false
		},
		fixed: {
			type: Boolean,
			default: true
		},
		placeholder: {
			type: Boolean,
			default: true
		},
		bgColor: {
			type: String,
			default: 'transparent'
		},
		titleStyle: {
			type: Object,
			default: () => {}
		},
		leftIconColor: {
			type: String,
			default: '#303133'
		},
		height: {
			type: String,
			default: '90rpx'
		}
	})
	
	// 左侧点击
	const leftClick = () => {
		uni.navigateBack()
	}
</script>

<style scoped lang="scss">
	::v-deep {
		.uv-navbar__content__left {
			padding: 0 25rpx;
		}
	}
</style>